//File: particle.cpp
//Author: J.G.Yuan
//Date: 2006-8-29
//Desp: define the basic structures and properties of particles, like position, velocity, color, 
//         alpha and life.
#include "stdafx.h"

#include "particle.h"

// constructor
Particle::Particle()
{
	pos.x = 0.0f;
	pos.y = 0.0f;
	pos.z = 0.0f;

	vel.vx = 0.0f;
	vel.vy = 0.0f;
	vel.vz = 0.0f;

	acc.ax = 0.0f;
	acc.ay = 0.0f;
	acc.az = 0.0f;

	col.r = 0.0f;
	col.g = 0.0f;
	col.b = 0.0f;

    m_texture = 0;
	fAlpha = 1.0f;
	fAlfdec = 0.0f;
	fLife = 1.0f;
	bDead = false;
}

Particle::Particle(POSITION& inPos, VELOCITY& inVel, ACCELERATION& inAcc,COLOR& inCol, 
    unsigned int inTexure, float inAlpha, float inAlfdec, float inLife, bool inDead) 
    : pos(inPos), vel(inVel), col(inCol), acc(inAcc), m_texture(inTexure),
      fAlpha(inAlpha), fAlfdec(inAlfdec), fLife(inLife), bDead(inDead)
{

}

//copy constructor
Particle::Particle(const Particle& p)
{
	pos = p.pos;
	vel = p.vel;
	col = p.col;
	acc = p.acc;
    m_texture = p.m_texture;
	fAlpha = p.fAlpha;
	fAlfdec = p.fAlfdec;
	fLife = p.fLife;
	bDead = p.bDead;
}

// class destructor
Particle::~Particle()
{
}
